package com.peng.edu.controller;

import com.peng.utils.Result;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;

@RestController
@RequestMapping("/edu/user")
@CrossOrigin
public class EduLoginController {

    @PostMapping("/login")
    public Result login(){
        HashMap<String, Object> map = new HashMap<>();
        map.put("token","admin");
        return Result.ok().data(map);
    }

    @GetMapping("/info")
    public Result info(){
        HashMap<String, Object> map = new HashMap<>();
        map.put("roles","[admin]");
        map.put("name","admin");
        map.put("avatar","https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
        return Result.ok().data(map);
    }
}
